Reliable data reading with data set screening by error injection

ABSTRACT

According to one embodiment, a system includes a controller configured to determine whether a position error signal (PES) is invalid while reading data from a magnetic medium using at least one data channel. An invalid PES indicates off-track reading or a defect in the magnetic medium. The controller is also configured to determine whether a PES value is above a first predetermined threshold in response to a determination that the PES is valid. Moreover, the controller is configured to inject error bits into a data stream in place of corresponding bits of decoded data in response to a determination that the PES is invalid, a determination that the PES value is above the first predetermined threshold, or a determination that the PES is invalid and the PES value is above the first predetermined threshold. Other systems and methods are described in accordance with more embodiments.

BACKGROUND

The present invention relates to data storage, and more particularly, toreliable data reading with data set screening by error injection using adata channel in a magnetic tape drive.

With a linear tape storage system, it is important to keep magnetic dataheads aligned with target data tracks while reading data from tapemedia. A track-following servo system is usually engaged withcontrolling the magnetic head position using a position error signal(PES) which is derived from positional relativity between thepre-written servo pattern on the magnetic media and magnetic headposition. In order to follow the servo track, a valid PES must bedetected. However, tape media typically have some amount of defects andscratches of varying sizes, particularly after being in use for anysignificant amount of time. Detecting an invalid PES causes loss ofmagnetic head position control in a feedback loop and eventually datareaders will become located outside of target data tracks.

On the other hand, magnetic heads may be knocked off track while inoperation due to a mechanical disturbance, vibration, and/or shockevent. Any of these disturbances has the potential to push magnetic headposition off of the target tracks.

In either case, off-track reading causes increases in read errors whichmust be responded to by the tape drive. To ensure data integrity, thetape drive adds error correction code (ECC) to original data whilewriting the data onto tracks of the tape media. The ECC and associateddata is then decoded for reconstruction of the original data during aread operation. The ECC contributes to more successful data recovery incase the original data is damaged due to media defect or some otherdisturbance. It also helps to compensate for off-track reading, but itseffectiveness depends on the severity of the off-track reading.

SUMMARY

According to one embodiment, a system includes a controller configuredto determine whether a position error signal (PES) is invalid whilereading data from a magnetic medium using at least one data channel. Aninvalid PES indicates off-track reading or a defect in the magneticmedium. The controller is also configured to determine whether a PESvalue is above a first predetermined threshold in response to adetermination that the PES is valid. Moreover, the controller isconfigured to inject error bits into a data stream in place ofcorresponding bits of decoded data in response to a determination thatthe PES is invalid, a determination that the PES value is above thefirst predetermined threshold, or a determination that the PES isinvalid and the PES value is above the first predetermined threshold.

In another embodiment, a controller includes a hardware processor andlogic integrated with the hardware processor. The logic is configured tocause the hardware processor to receive a PES and a PES value from aservo channel of a magnetic medium. The logic is also configured tocause the hardware processor to determine whether the PES is invalidwhile reading the data from the magnetic medium. An invalid PESindicates off-track reading or a defect in the magnetic medium.Moreover, the logic is configured to cause the hardware processor todetermine whether the PES value is above a first predetermined thresholdin response to a determination that the PES is valid. Also, the logic isconfigured to cause the hardware processor to inject error bits into adata stream in place of corresponding bits of decoded data in responseto a determination that the PES is invalid, a determination that the PESvalue is above the first predetermined threshold, or a determinationthat the PES is invalid and the PES value is above the firstpredetermined threshold.

According to another embodiment, a method includes determining whether aPES is invalid while reading data from a magnetic medium using at leastone data channel. An invalid PES indicates off-track reading or a defectin the magnetic medium. The method also includes determining whether aPES value is above a first predetermined threshold in response to adetermination that the PES is valid. Moreover, the method includesinjecting error bits into a data stream in place of corresponding bitsof decoded data in response to a determination that the PES is invalid,a determination that the PES value is above the first predeterminedthreshold, or a determination that the PES is invalid and the PES valueis above the first predetermined threshold.

Other aspects and embodiments of the present invention will becomeapparent from the following detailed description, which, when taken inconjunction with the drawings, illustrates by way of example theprinciples of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a network storage system, according to oneembodiment.

FIG. 1B illustrates a simplified tape drive of a tape-based data storagesystem, according to one embodiment.

FIG. 2 shows a typical tape read situation.

FIG. 3A shows an exemplary tape read situation.

FIG. 3B shows another exemplary tape read situation.

FIG. 4A shows a tape read situation and solution, according to oneembodiment.

FIG. 4B shows a tape read situation and solution, according to oneembodiment.

FIG. 5 shows a block diagram of a system, according to one embodiment.

FIG. 6 is a flowchart of a method according to one embodiment.

DETAILED DESCRIPTION

The following description is made for the purpose of illustrating thegeneral principles of the present invention and is not meant to limitthe inventive concepts claimed herein. Further, particular featuresdescribed herein can be used in combination with other describedfeatures in each of the various possible combinations and permutations.

Unless otherwise specifically defined herein, all terms are to be giventheir broadest possible interpretation including meanings implied fromthe specification as well as meanings understood by those skilled in theart and/or as defined in dictionaries, treatises, etc. It must also benoted that, as used in the specification and the appended claims, thesingular forms “a,” “an,” and “the” include plural referents unlessotherwise specified.

In one embodiment, data may be read from magnetic media in a mannerwhich avoids off-track reading and skips media defect areas whilescreening data sets. This is accomplished, in one approach, bymonitoring a position error signal (PES) value and a status of the PES(either valid or invalid). When screening the data set, an error datastream is injected in portions of the data stream as a replacement forthe actual data therein at an error correction code (ECC) decoder inputin case the PES valid status and PES value indicate that a magnetic headused to read the data is not on a target track. This approach allows fornon-stop ECC decoding processing and maximizes usage of error correctiononce the magnetic head position is back on the target track. Forinsurance of data integrity, in one embodiment, data may be masked outon both off-track reading areas and media defect areas.

According to one general embodiment, a system for processing dataincludes a controller configured to determine whether a PES is invalidwhile reading data from a magnetic medium using at least one datachannel, determine whether a PES value is above a first predeterminedthreshold when the PES is valid, and inject error bits into a datastream in place of corresponding bits of decoded data when the PES isinvalid and/or the PES value is above the first predetermined threshold.

In another general embodiment, a magnetic tape drive includes acontroller configured to read data from a magnetic medium using at leastone data channel, receive a PES and a PES value from a servo channel,determine whether the PES is invalid while reading the data, determinewhether the PES value is above a first predetermined threshold when thePES is valid, and inject error bits into a data stream in place ofcorresponding bits of decoded data when the PES is invalid and/or thePES value is above the first predetermined threshold.

According to another general embodiment, a method for processing dataincludes determining whether a PES is invalid while reading data from amagnetic medium using at least one data channel, determining whether aPES value is above a first predetermined threshold when the PES isvalid, injecting error bits into a data stream in place of correspondingbits of decoded data when the PES is invalid and/or the PES value isabove the first predetermined threshold, decoding the data using arun-length limited (RLL) decoder to produce the decoded data based onthe data from the magnetic medium, and outputting the data stream.

Referring now to FIG. 1A, a schematic of a network storage system 10 isshown according to one embodiment. This network storage system 10 isonly one example of a suitable storage system and is not intended tosuggest any limitation as to the scope of use or functionality ofembodiments of the invention described herein. Regardless, networkstorage system 10 is capable of being implemented and/or performing anyof the functionality set forth hereinabove.

In the network storage system 10, there is a computer system/server 12,which is operational with numerous other general purpose or specialpurpose computing system environments or configurations. Examples ofwell-known computing systems, environments, and/or configurations thatmay be suitable for use with computer system/server 12 include, but arenot limited to, personal computer systems, server computer systems, thinclients, thick clients, handheld or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1A, computer system/server 12 in the network storagesystem 10 is shown in the form of a general-purpose computing device.The components of computer system/server 12 may include, but are notlimited to, one or more processors or processing units 16, a systemmemory 28, and a bus 18 that couples various system components includingsystem memory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 may include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 may be provided forreading from and writing to a non-removable, non-volatile magneticmedia—not shown and typically called a “hard disk,” which may beoperated in a HDD. Although not shown, a magnetic disk drive for readingfrom and writing to a removable, non-volatile magnetic disk (e.g., a“floppy disk”), and an optical disk drive for reading from or writing toa removable, non-volatile optical disk such as a CD-ROM, DVD-ROM orother optical media may be provided. In such instances, each may beconnected to bus 18 by one or more data media interfaces. As will befurther depicted and described below, memory 28 may include at least oneprogram product having a set (e.g., at least one) of program modulesthat are configured to carry out the functions of embodiments describedherein.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication may occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 maycommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

FIG. 1B illustrates a simplified tape drive 100 of a tape-based datastorage system, which may be employed according to various embodiments.While one specific implementation of a tape drive is shown in FIG. 1B,it should be noted that the embodiments described herein may beimplemented in the context of any type of tape drive system. As shown, atape supply cartridge 120 and a take-up reel 121 are provided to supporta tape 122. One or more of the reels may form part of a removablecassette and are not necessarily part of the tape drive 100. The tapedrive 100, such as that illustrated in FIG. 1B, may further includedrive motor(s) to drive the tape supply cartridge 120 and the take-upreel 121 to move the tape 122 over a tape head 126 of any type.

Guides 125 guide the tape 122 across the tape head 126. Such tape head126 is in turn coupled to a controller assembly 128 via a cable 130. Thecontroller 128 typically comprises a servo channel 134 and data channel136 which includes data flow processing. It controls reel motion (notshown in FIG. 1B) and head functions, such as track following, writing,reading, etc. The cable 130 may include read/write circuits to transmitdata to the head 126 to be recorded on the tape 122 and to receive dataread by the head 126 from the tape 122. An actuator 132 moves the head126 to a set of tracks on the tape 122 in order to perform a write or aread operation.

In one embodiment, the tape drive 100 may comprise a data buffer 138which is accessible by the tape drive 100 and the controller 128. Thisdata buffer 138 may be organized as a ring buffer and may be split intoone or more portions, with one portion being a reserved data buffer 140,which may also be organized into a ring buffer, to be used for storageof partial data sets during reading operations from the tape 122.

An interface may also be provided for communication between the tapedrive 100 and a host (integral or external) to send and receive the dataand for controlling the operation of the tape drive 100 andcommunicating the status of the tape drive 100 to the host, as would beunderstood by one of skill in the art.

Typically, in order to avoid off-track reading of data from magneticmedia, such as a magnetic tape, a read operation is terminated when avalid position error signal (PES) is not available, e.g., an invalid PESis detected. This helps to avoid blind reading data from data tracksdifferent from target data tracks, but it disables the tape drive'scapability to recover the data with error correction code (ECC).

There are two types of defects that cause reading errors in conventionalreading methods: 1) stopping a read operation at a damaged servopattern, and 2) ignoring an invalid PES and continuing reading.

Once a servo pattern is damaged, invalid PES is generated and a servocontrol system will stop the read process. Multiple read retries will beattempted all reread attempts will fail due to the damaged servopattern. As a result, the tape drive will not be allowed to continue toread remaining data on the magnetic tape. This situation is shown inFIG. 2 according to one exemplary embodiment.

As shown in FIG. 2, a magnetic head 206 is moved along a target track204 of a magnetic tape 202, with its path being indicated by a lineindicating magnetic head movement 218. The magnetic tape 202 stores aplurality of data sets, which may be the smallest physical units of datawritten to the magnetic tape 202 and/or capable of being read from themagnetic tape 202. During this read operation 208, a first fragment of adata set, such as fragment 1 of data set N (DS#N), is read and noproblems are encountered until a defect 210 in the tape 202. This defect210 causes an invalid PES, and in response to the invalid PES, readoperations are stopped 212 to avoid blind reading the tape 202. At thispoint, only a first fragment of DS#N has been read. The magnetic head206 is then repositioned to reread 214 over the defect 210 which againproduces unreadable data. Therefore, all read operations are stopped 216again, and the remaining data on the tape 202 (the second fragment ofDS#N) is never even attempted to be read due to the defect 210.

Alternatively, as shown in FIG. 3A according to another exemplaryembodiment, the tape drive may ignore the validity or invalidity of thePES and possible misalignment of the magnetic head 206 and continue theread operation over the defect 210. However, in this situation, there isa risk of reading data from data tracks other than target data tracks.This situation is shown in FIGS. 3A-3B according to a couple ofexemplary embodiments.

In FIG. 3A, a magnetic head 206 reads DS#N (Fragment 1) until a defect210 in the tape 202 results in invalid PES, which may or may not causethe magnetic head 206 to veer off-track and read data from a track otherthan the target track 204, as indicated by the magnetic head movement218. During this read operation, instead of continuing to read DS#N, themagnetic head 206 reads a different data set stored on the other datatrack, DS#M. Then, after reading a valid PES, the magnetic head 206returns to the target track 204 and begins again to read DS#N (Fragment2). However, there is a missing portion of DS#N where DS#M was beingread instead, which results in incorrect data being read, which mostlikely will result in the data being unrecoverable, even with ECCdecoding.

In FIG. 3B, a similar situation is shown where a magnetic head 206 readsDS#N (Fragment 1) until a large lateral tape motion (LTM) 220 results inoff-track reading such that data is read data from a track other thanthe target track 204, as indicated by the magnetic head movement 218.During this read operation, instead of continuing to read DS#N, themagnetic head 206 reads a different data set stored on the other datatrack, DS#M. Then, after correcting for the LTM 220, the magnetic head206 returns to the target track 204 and begins again to read DS#N(Fragment 2). However, there is a missing portion of DS#N where DS#M wasbeing read instead, which results in incorrect data being read, whichmost likely will result in the data being unrecoverable, even with ECCdecoding.

The various embodiments described herein provide better methods toovercome invalid PES and possible magnetic head misalignment whilereading through media defects on servo patterns and avoiding readingdata from non-targeted data tracks.

In one embodiment, data may be read from magnetic media in a mannerwhich avoids off-track reading and skips media defect areas whilescreening data sets. This is accomplished, in one approach, bymonitoring the PES value and a status of the PES (either valid orinvalid). When screening the data set, an error data stream is injectedin portions of the data stream as a replacement for the actual datatherein at an ECC decoder input in case the PES valid status and PESvalue indicate that a magnetic head used to read the data is not on thetarget track. This approach allows for non-stop ECC decoding processingand maximizes usage of error correction once the magnetic head positionis back on the target track. For insurance of data integrity, in oneembodiment, data may be masked out on both off-track reading areas andmedia defect areas.

In FIG. 4A, a magnetic head 206 reads DS#N (Fragment 1) until a defect210 in the tape 202 results in invalid PES, which may or may not causethe magnetic head 206 to veer off-track and read data from a track otherthan the target track 204, as indicated by the magnetic head movement218. During this read operation, instead of continuing to read data fromthe magnetic tape 202, error is injected in place of any data read bythe magnetic head 206, according to one embodiment. Then, after readinga valid PES (because the magnetic head 206 has progressed past thedefect 210, returned to the target track 204, etc.), the magnetic head206 begins again to read DS#N (Fragment 2). However, there is a missingportion of DS#N where the error was injected (indicated as a ‘1’ buteither bit value may be used to indicate error injection, ‘0’ or ‘1’),which results in an incomplete data set. However, after ECC decoding,which is possible because the remaining portion of DS#N was read(Fragment#2), it is possible that the entire data set may be recovered,and therefore no repeated reading is required.

In FIG. 4B, a similar situation is shown where a magnetic head 206 readsDS#N (Fragment 1) until a large lateral tape motion (LTM) 220 results inthe magnetic head 206 being pushed off-track, as indicated by themagnetic head movement 218. Instead of storing the data read by themagnetic head 206 during off-track reading, error is injected in placeof any data read by the magnetic head 206, according to one embodiment.Then, after correcting for the LTM 220, the magnetic head 206 returns tothe target track 204 and begins again to read DS#N (Fragment 2).However, there is a missing portion of DS#N where the error was injected(indicated as a ‘1’ but either bit value may be used to indicate errorinjection, ‘0’ or ‘1’), which results in an incomplete data set.However, after ECC decoding, which is possible because the remainingportion of DS#N was read (Fragment#2), it is possible that the entiredata set may be recovered, and therefore no repeated reading isrequired.

It is preferred to inject error when PES is invalid or indicatesoff-track reading instead of simply stopping reading. This is becauseskipping a medium defect or off-track reading by stopping the readoperation will also result in error correction being adversely affected.Although stopping the entire read operation prevents reading wrong datafrom a non-target track, and when there is large medium defect followedby a clean area to read a whole data set, there is no difference betweenembodiments described herein and stopping the read operation entirely,there is a situation where stopping reading is harmful. Specifically, bystopping the read operation, the chance to recover the data set usingECC is lost. When small size defects are scattered on the medium, itcauses a bunch of data fragments while writing the data. Then, whenreading the data, error recovery is hampered by not reading all of thefragments after restart with ECC. It does not collect and combine thefragments to reconstruct the data. On the other hand, the proposedmethods using error injection solve the situation since read RLL decoderand ECC decoder are allowed to keep on running even while the servo isindicated as not being ready. As a result, this feature would combinefragments of data and the data is able to be read back afterreconstruction.

Now referring to FIG. 5, a system 500 is shown according to oneembodiment. The system 500 may include at least one data channel 502 andat least one servo channel 504. During normal read processing, the datachannel 502 passes data from the magnetic medium (such as a magnetictape) to a run-length limited (RLL) decoder 506 (or some other type ofdecoder known in the art). A read formatter block 508 comprises the RLLdecoder 506, an error injection module 510, and a multiplexer 512. TheRLL decoder 506 demodulates data from a data stream and outputs it intoan ECC decoder 514. The ECC decoder 514 is configured to perform ECCdecoding on the data stream, then pass the decoded data to a buffercontroller 516 for placement in a buffer queue, followed by transmissionby a host interface block 518 to a connected host.

In parallel with normal read processing, microcode, or some other typeof computer readable instructions known in the art, integrated withand/or accessible by a microprocessor 520, is executed to monitor PESvalues and validity. In one embodiment, this is performed by checking anoutput from one or more of the servo channels 504. Once themicroprocessor 520 detects PES invalid and/or magnetic head positionbeing off-track (e.g., not on-track), the microprocessor 520, viainstruction in the microcode, switches the multiplexer 512 to receive asignal from the error injection module 510, instead of from the RLLdecoder 506 as is normal in a read operation.

The error injection module 510 generates an error bit stream whichincludes all the same bits (e.g., either ‘1’ or ‘0’, depending on whichbit indicates an error being detected. This forces the ECC decoder 514to refrain from decoding data read from a non-target track. After thePES status returns to valid and the magnetic head is no longer off-track(e.g., it is on-track), the microprocessor 520, via instruction in themicrocode, controls the multiplexer 512 to return back to receiving andsending the data stream received from the RLL decoder 506, as in anormal read operation.

In order to control the various components described in system 500,microcode may be implemented in one or more of the components and/or oneor more processors in the system 500, such as the microprocessor 520.The microcode may be executed on the microprocessor 520 on a real timebasis, such as every 20 μs, 30 μs, 40 μs, 50 μs, 60 μs, etc.

Now referring to FIG. 6, a flowchart of a method 600 for processing datais shown according to one embodiment. The method 600 may be performed inaccordance with the present invention in any of the environmentsdepicted in FIGS. 1A-5, among others, in various embodiments. Of course,more or less operations than those specifically described in FIG. 6 maybe included in method 600, as would be understood by one of skill in theart upon reading the present descriptions.

Each of the steps of the method 600 may be performed by any suitablecomponent of the operating environment. For example, in variousembodiments, the method 600 may be partially or entirely performed by amagnetic tape drive, tape drive controller, or some other device havingone or more processors therein. The processor, e.g., processingcircuit(s), chip(s), and/or module(s) implemented in hardware and/orsoftware, and preferably having at least one hardware component may beutilized in any device to perform one or more steps of the method 600.Illustrative processors include, but are not limited to, a centralprocessing unit (CPU), an application specific integrated circuit(ASIC), a switching ASIC, a field programmable gate array (FPGA), etc.,combinations thereof, or any other suitable computing device known inthe art.

As shown in FIG. 6, method 600 may initiate with operation 602, where itis determined whether a PES is invalid while reading data from amagnetic medium using at least one data channel. When the PES isinvalid, method 600 continues to operation 606; otherwise, method 600continues to operation 604.

According to one embodiment, the PES (along with a PES value) may bereceived from and/or read through a servo channel of a magnetic mediumdrive, reading device, etc., such as a tape drive, HDD, optical drive,etc. Certain aspects of the method 600 may change depending on what typeof magnetic data storage medium is being read and having data thereofprocessed, but the overall scheme translates across many different mediaplatforms.

In another embodiment, the data may be received from and/or read throughthe at least one data channel, either by the magnetic medium drive orsome other system configured for such data reading.

Method 600 may be repeated periodically in order to track, in real time,the validity of the PES over the course of reading data from a magneticmedium, in one embodiment. Furthermore, validity of the PES may bedetermined periodically (such as every 20 μs, 30 μs, 40 μs, 50 μs, 60μs, etc.) while reading the data from the magnetic medium using the atleast one data channel, according to another embodiment.

In operation 604, it is determined whether a PES value is above a firstpredetermined threshold when the PES is valid, which indicates that amagnetic head used to read data from the magnetic medium is off-track.Again, the PES value may be received from and/or read through the servochannel of a magnetic medium drive. When the PES value is above thefirst predetermined threshold, method 600 continues to operation 606;otherwise, method 600 continues to operation 610.

The first predetermined threshold may be based at least partially ontrack pitch for the magnetic medium used to store the data. For example,when using a 32-track magnetic tape, the first predetermined thresholdmay be selected to be in a range from about 3.5 μm to about 10 μm, suchas about 5 μm.

In operation 606, a counter is reset. The counter is configured fortracking a number of times that data has been read from the magneticmedium without utilizing the error injection described in operation 608.Resetting the counter may put the counter back to zero, or some otherstarting numeric value from which counting is to begin anew.

In operation 608, error bits are injected into a data stream in place ofcorresponding bits of decoded data from a decoder. This occurs wheneverthe PES is invalid and/or the PES value is above the first predeterminedthreshold, as determined previously in operations 602 and 604,respectively. According to one embodiment, this may be consideredplacing the magnetic medium drive into error injection mode so thaterror bits are injected into the data stream whenever the magnetic headis off-track or the PES is invalid instead of using the data read fromthe magnetic medium (which may be decoded).

In one embodiment, the error bits may be injected into the data streamin place of corresponding bits of the decoded data using a multiplexer,the multiplexer being configured to produce the data stream byselectively choosing an error bit from an error injection module or abit of decoded data from a decoder, such as a RLL decoder or some othersuitable decoder of a type known in the art.

After injecting error into the data stream, the data stream is output inoperation 620.

In operation 610, it is determined whether error is already beinginjected into the data stream, as described in operation 608, such asdue to being in the error injection mode prior to this iteration ofmethod 600. This decision is made when the PES value is not above thefirst predetermined threshold, as described in operation 604. When erroris being injected, method 600 continues to operation 612; otherwise,method 600 continues to operation 618 to utilize the decoded data fromthe decoder for the data stream instead of injected error.

In this way, according to method 600, each bit in the data stream isselected from either injected error or the decoder, with the bit beingselected from an error injection module when the PES is invalid and/orthe PES value is above the first predetermined threshold, and the bitbeing selected from the decoder when the PES is valid and the PES valueis not above the first predetermined threshold.

In operation 612, it is determined whether the PES value is above asecond predetermined threshold. This determination is made when error isbeing injected into the data stream and the PES value is not above thefirst predetermined threshold, as determined in operations 610 and 604,respectively, described previously. When the PES value is above thesecond predetermined threshold, method 600 returns to operation 606 toreset the counter; otherwise, method 600 continues to operation 614 toincrement the counter.

The second predetermined threshold may be based at least partially ontrack pitch for the magnetic medium used to store the data. For example,when using a 32-track magnetic tape, the second predetermined thresholdmay be selected to be in a range from about 0.5 μm to about 2 μm, suchas about 1 μm.

In operation 614, the counter is incremented. When the counter is basedon single numeric values, it may be incremented by one. Of course, anynumber may be added to the counter, as long as the overall scheme isunderstood as to when the counter may be greater than a thirdpredetermined threshold, as described below.

In operation 616, it is determined whether the counter is above thethird predetermined threshold. This determination is made when the PESvalue is not above the second predetermined threshold, as determinedpreviously in operation 612. When the counter is above the thirdpredetermined threshold, method 600 continues to operation 618 toutilize decoded data in the data stream; otherwise, method 600 returnsto operation 608 to utilize error injection in the data stream.

The third predetermined threshold may be any numeric value which isdetermined to indicate that the magnetic medium is going to be on-trackand will not be off-track in the near future, as indicated by a numberof on-track reads, the number totaling the third predetermined thresholdfor the counter to exceed. For example, the third predeterminedthreshold may be in a range from about 20 to about 200, such as about100. In this embodiment, 100 PES validity checks during on-track readsmust be made before error stops being injected into the data stream.

In operation 618, bits of decoded data from the decoder are used in thedata stream instead of error bits. Furthermore, if error bits hadpreviously been used, this error injection into the data stream isstopped. Operation 618 is performed when the counter is above the thirdpredetermined threshold, indicating on-track reading and/or when errorinjection mode is not set in the magnetic medium drive.

In a further embodiment, the data read from the magnetic medium may bedecoded using a RLL decoder to produce the decoded data. However, anysuitable decoder known in the art may be used.

In operation 620, the data stream is output, such as by transmitting itto another component of the magnetic medium drive, decoding the dataagain to further correct errors therein, etc.

In another embodiment, an ECC decoder may further decode the data streamafter being output. The ECC decoder may be configured to utilize ECC tocorrect remaining errors (including injected errors) in the data stream(which may include a mix of decoded data and injected error).

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Moreover, a system according to various embodiments may include aprocessor and logic integrated with and/or executable by the processor,the logic being configured to perform one or more of the process stepsrecited herein. By integrated with, what is meant is that the processorhas logic embedded therewith as hardware logic, such as an ASIC, a FPGA,etc. By executable by the processor, what is meant is that the logic ishardware logic; software logic such as firmware, part of an operatingsystem, part of an application program; etc., or some combination ofhardware and software logic that is accessible by the processor andconfigured to cause the processor to perform some functionality uponexecution by the processor. Software logic may be stored on local and/orremote memory of any memory type, as known in the art. Any processorknown in the art may be used, such as a software processor module and/ora hardware processor such as an ASIC, a FPGA, a CPU, an integratedcircuit (IC), a graphics processing unit (GPU), etc.

It will be clear that the various features of the foregoing systemsand/or methodologies may be combined in any way, creating a plurality ofcombinations from the descriptions presented above.

It will be further appreciated that embodiments of the present inventionmay be provided in the form of a service deployed on behalf of acustomer to offer service on demand.

While various embodiments have been described above, it should beunderstood that they have been presented by way of example only, and notlimitation. Thus, the breadth and scope of a preferred embodiment shouldnot be limited by any of the above-described exemplary embodiments, butshould be defined only in accordance with the following claims and theirequivalents.

What is claimed is:
 1. A system, comprising: a controller, thecontroller configured to: determine whether a position error signal(PES) is invalid while reading data from a magnetic medium using atleast one data channel, an invalid PES indicating off-track reading or adefect in the magnetic medium; determine whether a PES value is above afirst predetermined threshold in response to a determination that thePES is valid; and inject error bits into a data stream in place ofcorresponding bits of decoded data in response to a determination thatthe PES is invalid, a determination that the PES value is above thefirst predetermined threshold, or a determination that the PES isinvalid and the PES value is above the first predetermined threshold,wherein the error bits are injected into the data stream in place ofcorresponding bits of the decoded data using a multiplexer, themultiplexer being configured to produce the data stream by selectivelychoosing an error bit from an error injection module or a bit of thedecoded data from a decoder, and wherein the controller is furtherconfigured to: read the data from the magnetic medium using the at leastone data channel; and receive the PES and PES value from a servochannel.
 2. The system as recited in claim 1, wherein the controller isfurther configured to: decode the data using a run-length limited (RLL)decoder to produce the decoded data based on the data from the magneticmedium; and output the data stream.
 3. The system as recited in claim 1,wherein the controller is further configured to decode the data streamusing an error correction code (ECC) decoder to further correctremaining errors in the data stream, and wherein validity of the PES isdetermined periodically while reading the data from the magnetic mediumusing the at least one data channel.
 4. The system as recited in claim1, wherein the error bit is selected from the error injection module inresponse to the determination that the PES is invalid and in response tothe determination that the PES value is above the first predeterminedthreshold, and wherein the bit is selected from the decoder in responseto the determinations that the PES is valid and the PES value is notabove the first predetermined threshold.
 5. The system as recited inclaim 1, wherein the controller is further configured to determinewhether error is already being injected into the data stream in responseto a determination that the PES value is not above the firstpredetermined threshold.
 6. The system as recited in claim 5, whereinthe controller is further configured to: determine whether the PES valueis above a second predetermined threshold in response to determinationsthat error is being injected into the data stream and the PES value isnot above the first predetermined threshold; increment a counter anddetermine whether the counter is above a third predetermined thresholdin response to a determination that the PES value is not above thesecond predetermined threshold; utilize the decoded data for the datastream and stop injecting error into the data stream in response to adetermination that the counter is above a third predetermined thresholdafter incrementing the counter; reset the counter in response to adetermination that the PES value is above the second predeterminedthreshold and inject error bits into the data stream in place ofcorresponding bits of the decoded data; and inject error bits into thedata stream in place of corresponding bits of the decoded data inresponse to determinations that the PES value is not above the secondpredetermined threshold and the counter is not above the thirdpredetermined threshold.
 7. An apparatus, comprising: a hardwarecontroller and logic integrated with the hardware controller, the logicbeing configured to cause the hardware controller to: receive, by thehardware controller, a position error signal (PES) and a PES value froma servo channel of a magnetic medium; determine, by the hardwarecontroller, whether the PES is invalid while reading data from themagnetic medium using at least one data channel, an invalid PESindicating off-track reading or a defect in the magnetic medium;determine, by the hardware controller, whether the PES value is above afirst predetermined threshold in response to a determination that thePES is valid; and inject, by the hardware controller, error bits into adata stream in place of corresponding bits of decoded data in responseto a determination that any of the following is determined to be true:the PES is invalid, the PES is valid and the PES value is above thefirst predetermined threshold, and the PES is invalid and the PES valueis above the first predetermined threshold, wherein the data stream isproduced by selectively choosing an error bit from an error injectionmodule or a bit of the decoded data from a decoder using a multiplexer,wherein the error bit is selected from the error injection module inresponse to the determination that the PES is invalid and/or the PESvalue is above the first predetermined threshold, and wherein the bit isselected from the decoder in response to a determination that the PES isvalid and the PES value is not above the first predetermined threshold.8. The apparatus as recited in claim 7, wherein the data stream isproduced by selectively choosing an error bit from an error injectionmodule or a bit of the decoded data from a decoder, and wherein thelogic further causes the hardware controller to: decode the data streamusing a run-length limited (RLL) decoder to produce the decoded databased on the data from the magnetic medium; and output the data stream.9. The apparatus as recited in claim 7, wherein the logic further causesthe hardware controller to decode the data stream using an errorcorrection code (ECC) decoder to further correct remaining errors in thedata stream, and wherein validity of the PES is determined periodicallywhile reading the data from the magnetic medium using the at least onedata channel.
 10. The apparatus as recited in claim 7, wherein the logicfurther causes the hardware controller to determine whether error isalready being injected into the data stream in response to adetermination that the PES value is not above the first predeterminedthreshold.
 11. The apparatus as recited in claim 10, wherein the logicfurther causes the hardware controller to: determine whether the PESvalue is above a second predetermined threshold in response todeterminations that error is being injected into the data stream and thePES value is not above the first predetermined threshold; increment acounter and determine whether the counter is above a third predeterminedthreshold in response to a determination that the PES value is not abovethe second predetermined threshold; utilize the decoded data for thedata stream and stop injecting error into the data stream in response toa determination that the counter is above a third predeterminedthreshold after incrementing the counter; reset the counter in responseto a determination that the PES value is above the second predeterminedthreshold and inject error bits into the data stream in place ofcorresponding bits of the decoded data; and inject error bits into thedata stream in place of corresponding bits of the decoded data inresponse to determinations that the PES value is not above the secondpredetermined threshold and the counter is not above the thirdpredetermined threshold.
 12. A controller-implemented method,comprising: determining, by a controller, whether a position errorsignal (PES) is invalid while reading data from a magnetic medium usingat least one data channel, an invalid PES indicating off-track readingor a defect in the magnetic medium; determining, by the controller,whether a PES value is above a first predetermined threshold in responseto a determination that the PES is valid; and injecting, by thecontroller, error bits into a data stream in place of corresponding bitsof decoded data in response to a determination that any of the followingis determined to be true: the PES is invalid, the PES is valid and thePES value is above the first predetermined threshold, and the PES isinvalid and the PES value is above the first predetermined threshold,wherein the error bits are injected into the data stream in place ofcorresponding bits of the decoded data using a multiplexer, themultiplexer being configured to produce the data stream by selectivelychoosing an error bit from an error injection module or a bit of thedecoded data from a decoder.
 13. The method as recited in claim 12,wherein the error bits are injected into the data stream in place ofcorresponding bits of the decoded data using a multiplexer, the methodfurther comprising: reading the data from the magnetic medium using theat least one data channel; and receiving the PES and PES value from aservo channel.
 14. The method as recited in claim 12, further comprisingdecoding the data stream using an error correction code (ECC) decoder tofurther correct remaining errors in the data stream, and whereinvalidity of the PES is determined periodically while reading the datafrom the magnetic medium using the at least one data channel.
 15. Themethod as recited in claim 12, wherein the error bit is selected fromthe error injection module in response to the determination that the PESis invalid and in response to the determination that the PES value isabove the first predetermined threshold, and wherein the bit is selectedfrom the decoder in response to the determinations that the PES is validand the PES value is not above the first predetermined threshold. 16.The method as recited in claim 12, further comprising determiningwhether error is already being injected into the data stream in responseto a determination that the PES value is not above the firstpredetermined threshold.
 17. The method as recited in claim 16, furthercomprising: determining whether the PES value is above a secondpredetermined threshold in response to determinations that error isbeing injected into the data stream and the PES value is not above thefirst predetermined threshold; incrementing a counter and determinewhether the counter is above a third predetermined threshold in responseto a determination that the PES value is not above the secondpredetermined threshold; utilizing the decoded data for the data streamand stop injecting error into the data stream in response to adetermination that the counter is above a third predetermined thresholdafter incrementing the counter; resetting the counter in response to adetermination that the PES value is above the second predeterminedthreshold and inject error bits into the data stream in place ofcorresponding bits of the decoded data; and inject error bits into thedata stream in place of corresponding bits of the decoded data inresponse to determinations that the PES value is not above the secondpredetermined threshold and the counter is not above the thirdpredetermined threshold.